package oc.tm.sg.admin;

import oc.tm.sg.core.rpc.provider.RpcProviderFactory;

import org.apache.log4j.Logger;

/**
 * 程序入口
 * 
 * @author lry
 */
public enum Bootstarp {

	INSTANCE;
	private static final Logger logger = Logger.getLogger(Bootstarp.class);

	public void start() {
		try {
			if (logger.isInfoEnabled()) {
				logger.info("Is startting...");
			}

			// 加载配置
			//SgAdminConf sgAdminConf = ConfigFactory.create(SgAdminConf.class);

			RpcProviderFactory.INSTANCE.start(9001);

			if (logger.isInfoEnabled()) {
				logger.info("Is startting...");
			}
		} catch (Throwable t) {
			t.printStackTrace();
		}
	}


	public static void main(String[] args) {
		Bootstarp.INSTANCE.start();
	}

}
